package com.isaac.sqlSession;

import com.isaac.pojo.Configuration;
import com.isaac.pojo.MappedStatement;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

public interface Executor {

    <E> List<E> query(Configuration configuration, MappedStatement mappedStatement, Object...params) throws SQLException, ClassNotFoundException, NoSuchFieldException, IllegalAccessException, IntrospectionException, InstantiationException, InvocationTargetException;

    int insert(Configuration configuration, MappedStatement mappedStatement, Object...params) throws SQLException, ClassNotFoundException, NoSuchFieldException, IllegalAccessException;

    int update(Configuration configuration, MappedStatement mappedStatement, Object...params) throws ClassNotFoundException, SQLException, IllegalAccessException, NoSuchFieldException;

    int delete(Configuration configuration, MappedStatement mappedStatement,Object...params) throws ClassNotFoundException, SQLException, IllegalAccessException, NoSuchFieldException;
}
